% 用来计算一些系数
gearRatio = 2.517;  %减速比 cr400bf = 2.517
torque_r = 1456.4;  %额定转矩N*m 1236
rpm_r = 4100; %rpm
Pcu_r = 20.8; %额定铜耗 20

Pfe_r = 12.5; %额定铁耗 12
wheel_D = 0.92; %车轮直径

pcu_s_ratio = 1/4.3;
pcu_r_ratio = 3.3/4.3;
pfe_s_ratio = 9/10;
pfe_r_ratio = 1/10;

FN = torque_r*gearRatio/wheel_D*2/1000;
vN = rpm_r/gearRatio / 60 * pi*wheel_D;
%% 计算等效定子损耗 Ps = k1 * Fe^2 + k3 * v^2 等价k1 k3系数，其中Fe,v的单位是 kN , m/s
k1 = pcu_s_ratio * 1/(FN)^2 * Pcu_r;
k3 = pfe_s_ratio * 1/(vN)^2 * Pfe_r;

%% 计算等效转子损耗 Pr = k1 * Fe^2 + k3 * v^2 等价k2 k4系数，其中Fe,v的单位是 kN , m/s
k2 = pcu_r_ratio * 1/(FN)^2 * Pcu_r;
k4 = pfe_r_ratio * 1/(vN)^2 * Pfe_r;

%% 计算风扇对定子等效冷却功率系数 负功率 Pws = d1 + k5*h + k6*(Ts-Tenv) cftool拟合得 单位是W 所以变成kW要系数除以1000
d1 = -1136.4 / 1000;
k5 = 1.4101 / 1000;
k6 = -78.2121 / 1000;

%% 计算风扇对转子等效冷却功率系数 Pwr = d2 + k7*h + k8*(Tr-Tenv)
d2 = -1.5634e+03 / 1000;
k7 = 1.6876 / 1000;
k8 = -75.1086 / 1000;

